import * as v from 'valibot';
import { UserPerm } from '@/types/user';
import { get } from '@/lib/request';

export async function getCurrentUserPerm() {
    const req = await get("/api/user/perm");
    const result = await req.json();

    return v.parse(UserPerm, result);
}
